#include <Road.h>
Public Member Functions | |
| Road (RoadType theType) | |
| ~Road () | |
| osg::Vec3 | calculateCatmull (osg::Vec3 A, osg::Vec3 B, osg::Vec3 C, osg::Vec3 D, double t) |
| void | setPoints (void) |
| void | addDots () |
| void | addLines (void) |
| void | addNewPoint (osg::Vec3 pos) |
| string * | returnTextName () |
| void | geometryInitialize () |
| void | setWidthAndHeight () |
Private Attributes | |
| RoadType | type |
| float | width |
| float | length |
| osg::Vec3 | controlPointArray [MaxNUMPOINTS] |
| osg::Vec3Array * | verts |
| int | numControlPoints |
| int | numPoints |
| int | controlPointsIndex |
| osg::ref_ptr< osg::Group > | dotRoot |
| osg::ref_ptr< osg::Group > | lineRoot |
| osg::ref_ptr< LinearConstraint > | dc |
Friends | |
| class | RoadMap |
|
|
constructor takes the type as argument |
|
|
|
|
|
Adds the dot geode to the dotRoot |
|
|
Adss the lines geode to the lineRoot |
|
|
Puts the argumen into the controlPointArray and calls the following respectively: addDots addLines
|
|
||||||||||||||||||||||||
|
Given four points the in between points are calculated.
|
|
|
sets dc's width height and verts variables. |
|
|
|
|
|
When a new control point is added this function is called |
|
|
according to the type of Road this function determines the width and length (for texturing purposes) of Road. |
|
|
|
|
|
control points for the Roads needed for catmull rom splines |
|
|
while calculating the spline points, this variable holds from where in the controlPointArray array to send to calculateCatmull |
|
|
conjuction of two roads is handled via this variable |
|
|
a node that holds control points in this road object |
|
|
length of a linear feature |
|
|
a node that holds lines draw between control points in this road object |
|
|
holds the number of the control points added uptonow |
|
|
holds the number of the points on the spline uptonow |
|
|
the type of the enum determines the road texture and size.. |
|
|
holds all the points calculated on the spline |
|
|
width of a linear feature |
1.4.6-NO